package cn.com.self.apis.portal.entity;

import cn.com.selfsoft.smartcity.commons.entity.AbstractEntity;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigInteger;
import java.sql.Timestamp;

/**
 * @Author CRL
 * @Date 2021/1/31 16:52
 * @Description 评价表
 */
@EqualsAndHashCode(callSuper = true)
@TableName("u_evaluate_info")
@Data
public class EvaluateEntity extends AbstractEntity {

    @NotNull(message = "项目或关联信息id不能为空")
    @NotBlank(message = "项目或关联信息id不能为空")
    @ApiModelProperty(value = "项目或关联信息id")
    private BigInteger objId;

    @NotNull(message = "被评价会员id不能为空")
    @NotBlank(message = "被评价会员id不能为空")
    @ApiModelProperty(value = "被评价会员id")
    private BigInteger memberIdEd;

    @NotNull(message = "会员id不能为空")
    @NotBlank(message = "会员id不能为空")
    @ApiModelProperty(value = "会员id")
    private BigInteger memberId;

    @ApiModelProperty(value = "评价时间")
    private Timestamp evaluateTime;

    @ApiModelProperty(value = "评价等级（字典evaluateGrade 1星，2星、3星、4星、5星）")
    private String evaluateGrade;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Timestamp createDate;

    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Timestamp updateDate;

    @ApiModelProperty(value = "排序")
    private String remarks;

    @ApiModelProperty(value = "删除标记")
    private String delFlag;

    @ApiModelProperty(value = "内容")
    private String content;

}
